/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

package tetris;

import java.awt.BorderLayout;
import java.awt.FlowLayout;
import javax.swing.JFrame;
import javax.swing.JLabel;
import javax.swing.JPanel;
import javax.swing.SwingUtilities;
import tetris.model.Model;
import tetris.view.GameFieldPanel;

/**
 *
 * @author vadim
 */
public class Tetris extends JFrame {
    private Model _model;
    private GameFieldPanel _gamePanel;
    /**
     * @param args the command line arguments
     */
    public static void main(String[] args) {
        SwingUtilities.invokeLater(new Runnable() {
            public void run() {
                new Tetris();
            }
        });
    }
    public Tetris() {
        _model = new Model();
        _gamePanel = new GameFieldPanel(_model);  
        setContentPane(_gamePanel);
        setTitle("Тетрис");
        setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
        setLocationRelativeTo(null);
        setVisible(true);
        this.setSize(_gamePanel.width(),_gamePanel.height());
        _gamePanel.setFocusable(true);
        _gamePanel.setVisible(true); 
    }
         
}
